﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="Majesty_of_Omega.GUI.Controls.MooPercentageBar"
	x:Name="UserControl" 
	
    MinWidth="100"
    Height="25"
	
	xmlns:Majesty_of_Omega_GUI_ValueConverters="clr-namespace:Majesty_of_Omega.GUI.ValueConverters"
	
	xmlns:Majesty_of_Omega_GUI_Controls="clr-namespace:Majesty_of_Omega.GUI.Controls" d:DesignWidth="160"
	
	>
	<UserControl.Resources>
		<Majesty_of_Omega_GUI_Controls:MooPercentageTextConverter x:Key="MooPercentageTextConverter"/>
		<Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}"/>
		<LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
			<GradientStop Color="white" Offset="0"/>
			<GradientStop Color="#B8E2F9" Offset="0.5"/>
			<GradientStop Color="#B0DFF8" Offset="1"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="HorizontalSliderThumbHoverBorder" Color="#3C7FB1"/>
		<LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
			<GradientStop Color="#B8E4FA" Offset="0.25"/>
			<GradientStop Color="#5EB4E3" Offset="0.5"/>
			<GradientStop Color="#4C8BB4" Offset="1"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="HorizontalSliderThumbPressedBorder" Color="#2C628B"/>
		<Geometry x:Key="SliderThumbDisabledGeometry">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>
		<Geometry x:Key="SliderPointedThumbDisabledGeometry">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
		<LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="0,1">
			<GradientStop Color="White" Offset="0"/>
			<GradientStop Color="#F0EFEF" Offset="0.4"/>
			<GradientStop Color="#D6D5D5" Offset=".8"/>
		</LinearGradientBrush>
		<Geometry x:Key="SliderPointedThumbOuterBorderGeometry">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>
		<Geometry x:Key="SliderPointedThumbMiddleBorderGeometry">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>
		<Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="Height" Value="18"/>
			<Setter Property="Width" Value="10"/>
			<Setter Property="Foreground" Value="Gray"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Thumb}">
						<Canvas SnapsToDevicePixels="true">
							<Canvas.RenderTransform>
								<TransformGroup>
									<TransformGroup.Children>
										<TransformCollection>
											<RotateTransform Angle="180"/>
											<TranslateTransform X="4" Y="9"/>
										</TransformCollection>
									</TransformGroup.Children>
								</TransformGroup>
							</Canvas.RenderTransform>
							<Path Fill="{DynamicResource DefaultedBorderBrush}" x:Name="Background" Stretch="Fill" Stroke="#FFFFFFFF" HorizontalAlignment="Right" Margin="0,0,-7.333,-26.833" VerticalAlignment="Bottom" Data="M24.333333,37.5 L16.000334,50.833333 31.334001,50.833665 z" StrokeThickness="2"/>
<!--
							<Path Fill="{StaticResource HorizontalSliderThumbNormalBackgroundInverted}" x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
							<Path Stroke="White" StrokeThickness="1" x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
							<Path Stroke="#FF929292" StrokeThickness="1" x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
-->							
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
<!--								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
-->
							</Trigger>
							<Trigger Property="Foreground" Value="Blue">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackgroundInverted}"/>
								<!--<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>-->
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackgroundInverted}"/>
								<!--<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>-->
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
								<!--<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
								<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
								<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>-->
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="HorizontalSliderThumbHoverBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="white" Offset="0"/>
			<GradientStop Color="#B8E2F9" Offset="0.5"/>
			<GradientStop Color="#B0DFF8" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="HorizontalSliderThumbPressedBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#B8E4FA" Offset="0.25"/>
			<GradientStop Color="#5EB4E3" Offset="0.5"/>
			<GradientStop Color="#4C8BB4" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="HorizontalSliderThumbNormalBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="White" Offset="0"/>
			<GradientStop Color="#F0EFEF" Offset="0.4"/>
			<GradientStop Color="#D6D5D5" Offset=".8"/>
		</LinearGradientBrush>
		<Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="Height" Value="18"/>
			<Setter Property="Width" Value="10"/>
			<Setter Property="Foreground" Value="Gray"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Thumb}">
						<Canvas SnapsToDevicePixels="true">
<!--							
							<Path Fill="{StaticResource HorizontalSliderThumbNormalBackground}" x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
							<Path Stroke="White" StrokeThickness="1" x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
							<Path Stroke="#FF929292" StrokeThickness="1" x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
-->							
							<Canvas.RenderTransform>
								<TranslateTransform X="0" Y="9"/>
							</Canvas.RenderTransform>
							<Path Fill="{DynamicResource DefaultedBorderBrush}" x:Name="Background" Stretch="Fill" Stroke="#FFFFFFFF" HorizontalAlignment="Right" Margin="0,0,-7.333,-26.833" VerticalAlignment="Bottom" Data="M24.333333,37.5 L16.000334,50.833333 31.334001,50.833665 z" StrokeThickness="2"/>							
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
							</Trigger>
							<Trigger Property="Foreground" Value="Blue">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<SolidColorBrush x:Key="HorizontalSliderTrackNormalBackground" Color="#FFE7EAEA"/>
		<LinearGradientBrush x:Key="HorizontalSliderTrackNormalBorder" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#FFAEB1AF" Offset="0.1"/>
			<GradientStop Color="White" Offset=".9"/>
		</LinearGradientBrush>
		<Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="IsTabStop" Value="false"/>
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type RepeatButton}">
						<Rectangle Fill="Transparent"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Geometry x:Key="SliderThumbOuterBorderGeometry">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>
		<Geometry x:Key="SliderThumbMiddleBorderGeometry">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>
		
		<Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="Height" Value="22"/>
			<Setter Property="Width" Value="11"/>
			<Setter Property="Foreground" Value="Gray"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Thumb}">
						<Canvas SnapsToDevicePixels="true">
<!--
							<Path Fill="{StaticResource HorizontalSliderThumbNormalBackground}" x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
							<Path Stroke="White" x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}"/>
							<Path Stroke="#FF929292" x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
-->							
							<Canvas.RenderTransform>
								<TranslateTransform X="3" Y="11"/>
							</Canvas.RenderTransform>
							<Path Fill="{DynamicResource DefaultedBorderBrush}" x:Name="Background" Stretch="Fill" Stroke="#FFFFFFFF" HorizontalAlignment="Center" VerticalAlignment="Bottom" Data="M24.333333,37.5 L16.000334,50.833333 31.334001,50.833665 z" StrokeThickness="2" Width="14.833" Margin="0,0,0,0" Canvas.Left="-3.833" Canvas.Top="-5.17" Height="17.5"/>							
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
							</Trigger>
							<Trigger Property="Foreground" Value="Blue">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbHoverBackground}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource HorizontalSliderThumbPressedBackground}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="VerticalSliderThumbHoverBackground" EndPoint="1,0" StartPoint="0,0">
			<GradientStop Color="white" Offset="0"/>
			<GradientStop Color="#B8E2F9" Offset="0.5"/>
			<GradientStop Color="#B0DFF8" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="VerticalSliderThumbPressedBackground" EndPoint="1,0" StartPoint="0,0">
			<GradientStop Color="#B8E4FA" Offset="0.25"/>
			<GradientStop Color="#5EB4E3" Offset="0.5"/>
			<GradientStop Color="#4C8BB4" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="VerticalSliderThumbNormalBackground" EndPoint="1,0" StartPoint="0,0">
			<GradientStop Color="White" Offset="0"/>
			<GradientStop Color="#F0EFEF" Offset="0.4"/>
			<GradientStop Color="#D6D5D5" Offset=".8"/>
		</LinearGradientBrush>
		<Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="Height" Value="10"/>
			<Setter Property="Width" Value="18"/>
			<Setter Property="Foreground" Value="Gray"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Thumb}">
						<Canvas SnapsToDevicePixels="true">
							<Canvas.RenderTransform>
								<TransformGroup>
									<TransformGroup.Children>
										<TransformCollection>
											<RotateTransform Angle="90"/>
											<TranslateTransform X="9" Y="5"/>
										</TransformCollection>
									</TransformGroup.Children>
								</TransformGroup>
							</Canvas.RenderTransform>
							<Path Fill="{StaticResource VerticalSliderThumbNormalBackground}" x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
							<Path Stroke="White" StrokeThickness="1" x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
							<Path Stroke="#FF929292" StrokeThickness="1" x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
							</Trigger>
							<Trigger Property="Foreground" Value="Blue">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
								<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
								<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="VerticalSliderThumbHoverBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
			<GradientStop Color="white" Offset="0"/>
			<GradientStop Color="#B8E2F9" Offset="0.5"/>
			<GradientStop Color="#B0DFF8" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="VerticalSliderThumbPressedBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
			<GradientStop Color="#B8E4FA" Offset="0.25"/>
			<GradientStop Color="#5EB4E3" Offset="0.5"/>
			<GradientStop Color="#4C8BB4" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="VerticalSliderThumbNormalBackgroundInverted" EndPoint="0,0" StartPoint="1,0">
			<GradientStop Color="White" Offset="0"/>
			<GradientStop Color="#F0EFEF" Offset="0.4"/>
			<GradientStop Color="#D6D5D5" Offset=".8"/>
		</LinearGradientBrush>
		<Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="Height" Value="10"/>
			<Setter Property="Width" Value="18"/>
			<Setter Property="Foreground" Value="Gray"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Thumb}">
						<Canvas SnapsToDevicePixels="true">
							<Canvas.RenderTransform>
								<TransformGroup>
									<TransformGroup.Children>
										<TransformCollection>
											<RotateTransform Angle="-90"/>
											<TranslateTransform X="9" Y="5"/>
										</TransformCollection>
									</TransformGroup.Children>
								</TransformGroup>
							</Canvas.RenderTransform>
							<Path Fill="{StaticResource VerticalSliderThumbNormalBackgroundInverted}" x:Name="Background" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
							<Path Stroke="White" StrokeThickness="1" x:Name="InnerBorder" Data="{StaticResource SliderPointedThumbMiddleBorderGeometry}"/>
							<Path Stroke="#FF929292" StrokeThickness="1" x:Name="OuterBorder" Data="{StaticResource SliderPointedThumbOuterBorderGeometry}"/>
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
							</Trigger>
							<Trigger Property="Foreground" Value="Blue">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackgroundInverted}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackgroundInverted}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
								<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
								<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderPointedThumbDisabledGeometry}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="VerticalSliderTrackNormalBorder" EndPoint="1,0" StartPoint="0,0">
			<GradientStop Color="#FFAEB1AF" Offset="0.1"/>
			<GradientStop Color="White" Offset=".9"/>
		</LinearGradientBrush>
		<Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
			<Setter Property="Focusable" Value="false"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="Height" Value="11"/>
			<Setter Property="Width" Value="22"/>
			<Setter Property="Foreground" Value="Gray"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Thumb}">
						<Canvas SnapsToDevicePixels="true">
							<Canvas.RenderTransform>
								<TransformGroup>
									<TransformGroup.Children>
										<TransformCollection>
											<RotateTransform Angle="90"/>
											<TranslateTransform X="11" Y="5.5"/>
										</TransformCollection>
									</TransformGroup.Children>
								</TransformGroup>
							</Canvas.RenderTransform>
							<Path Fill="{StaticResource VerticalSliderThumbNormalBackground}" x:Name="Background" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
							<Path Stroke="White" StrokeThickness="1" x:Name="InnerBorder" Data="{StaticResource SliderThumbMiddleBorderGeometry}"/>
							<Path Stroke="#FF929292" StrokeThickness="1" x:Name="OuterBorder" Data="{StaticResource SliderThumbOuterBorderGeometry}"/>
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
							</Trigger>
							<Trigger Property="Foreground" Value="Blue">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbHoverBackground}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbHoverBorder}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="Background" Value="{StaticResource VerticalSliderThumbPressedBackground}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="{StaticResource HorizontalSliderThumbPressedBorder}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="Background" Value="#FFF4F4F4"/>
								<Setter Property="Stroke" TargetName="InnerBorder" Value="{x:Null}"/>
								<Setter Property="Data" TargetName="OuterBorder" Value="{StaticResource SliderThumbDisabledGeometry}"/>
								<Setter Property="Stroke" TargetName="OuterBorder" Value="#FFAEB1AF"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="MooSliderStyle" TargetType="{x:Type Slider}">
			<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Foreground" Value="#FFC4C4C4"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Slider}">
						<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<TickBar x:Name="TopTick" Height="4" Visibility="Collapsed" Grid.Row="0" Fill="{TemplateBinding Foreground}" Placement="Top"/>
								<TickBar x:Name="BottomTick" Height="4" Visibility="Collapsed" Grid.Row="2" Fill="{TemplateBinding Foreground}" Placement="Bottom"/>
								<Border Margin="5,0" x:Name="TrackBackground" VerticalAlignment="center" Height="4.0" Grid.Row="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" BorderBrush="{StaticResource HorizontalSliderTrackNormalBorder}" BorderThickness="1" CornerRadius="1" Visibility="Hidden">
									<Canvas Margin="-6,-1">
										<Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" x:Name="PART_SelectionRange" Height="4.0" Visibility="Hidden"/>
									</Canvas>
								</Border>
								<Track x:Name="PART_Track" Grid.Row="1">
									<Track.DecreaseRepeatButton>
										<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
									</Track.DecreaseRepeatButton>
									<Track.IncreaseRepeatButton>
										<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
									</Track.IncreaseRepeatButton>
									<Track.Thumb>
										<Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}"/>
									</Track.Thumb>
								</Track>
							</Grid>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="TickPlacement" Value="TopLeft">
								<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
								<Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
								<Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
							</Trigger>
							<Trigger Property="TickPlacement" Value="BottomRight">
								<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
								<Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
								<Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
							</Trigger>
							<Trigger Property="TickPlacement" Value="Both">
								<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
								<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsSelectionRangeEnabled" Value="true">
								<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsKeyboardFocused" Value="true">
								<Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
			<Style.Triggers>
				<Trigger Property="Orientation" Value="Vertical">
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="{x:Type Slider}">
								<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
									<Grid>
										<Grid.ColumnDefinitions>
											<ColumnDefinition Width="Auto"/>
											<ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
											<ColumnDefinition Width="Auto"/>
										</Grid.ColumnDefinitions>
										<TickBar x:Name="TopTick" Width="4" Visibility="Collapsed" Grid.Column="0" Fill="{TemplateBinding Foreground}" Placement="Left"/>
										<TickBar x:Name="BottomTick" Width="4" Visibility="Collapsed" Grid.Column="2" Fill="{TemplateBinding Foreground}" Placement="Right"/>
										<Border HorizontalAlignment="center" Margin="0,5" x:Name="TrackBackground" Width="4.0" Grid.Column="1" Background="{StaticResource HorizontalSliderTrackNormalBackground}" BorderBrush="{StaticResource VerticalSliderTrackNormalBorder}" BorderThickness="1" CornerRadius="1">
											<Canvas Margin="-1,-6">
												<Rectangle Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" x:Name="PART_SelectionRange" Width="4.0" Visibility="Hidden"/>
											</Canvas>
										</Border>
										<Track x:Name="PART_Track" Grid.Column="1">
											<Track.DecreaseRepeatButton>
												<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
											</Track.DecreaseRepeatButton>
											<Track.IncreaseRepeatButton>
												<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
											</Track.IncreaseRepeatButton>
											<Track.Thumb>
												<Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
											</Track.Thumb>
										</Track>
									</Grid>
								</Border>
								<ControlTemplate.Triggers>
									<Trigger Property="TickPlacement" Value="TopLeft">
										<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
										<Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
										<Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
									</Trigger>
									<Trigger Property="TickPlacement" Value="BottomRight">
										<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
										<Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
										<Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
									</Trigger>
									<Trigger Property="TickPlacement" Value="Both">
										<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
										<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
									</Trigger>
									<Trigger Property="IsSelectionRangeEnabled" Value="true">
										<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
									</Trigger>
									<Trigger Property="IsKeyboardFocused" Value="true">
										<Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
									</Trigger>
								</ControlTemplate.Triggers>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Trigger>
			</Style.Triggers>
		</Style>
	</UserControl.Resources>

	<Grid HorizontalAlignment="Stretch" x:Name="LayoutRoot" >
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="13.875"/>
			<ColumnDefinition Width="6.125"/>
			<ColumnDefinition Width="*"/>
			<ColumnDefinition Width="4.25"/>
			<ColumnDefinition Width="15.75"/>
			<ColumnDefinition Width="35"/>
		</Grid.ColumnDefinitions>
		<ProgressBar Height="Auto" Value="{Binding Path=Value, ElementName=Slider, Mode=Default}" Grid.Column="2" Grid.ColumnSpan="1" x:Name="Progress"/>
		<Slider Grid.Column="1" VerticalAlignment="Center" Style="{DynamicResource MooSliderStyle}" Grid.ColumnSpan="3" Maximum="100" Value="{Binding Path=PercentageValue, ElementName=UserControl, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" x:Name="Slider" ValueChanged="Slider_ValueChanged" />
		<RepeatButton Grid.Column="3" x:Name="RightButton" Grid.ColumnSpan="2" Click="RightButton_Click" >
			<Path Fill="#FF000000" Stretch="Fill" Stroke="{x:Null}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="7.833" Height="9.834" Data="M146,213.33333 C146,213.33333 138.24983,218.87548 138.24983,218.87548 L145.87527,223.75034 z" RenderTransformOrigin="0.5,0.5">
				<Path.RenderTransform>
					<ScaleTransform ScaleX="-1" ScaleY="1"/>
				</Path.RenderTransform>
			</Path>
		</RepeatButton>
		<TextBlock Text="{Binding Path=Value, Converter={StaticResource MooPercentageTextConverter}, ElementName=Slider, Mode=Default}" HorizontalAlignment="Right" Foreground="#FFFFFFFF" d:LayoutOverrides="Height" Grid.Column="5" VerticalAlignment="Center"/>
		<RepeatButton x:Name="LeftButton" Style="{DynamicResource SliderButtonStyle}" Grid.ColumnSpan="2" Click="LeftButton_Click" >
			<Path Fill="#FF000000" Stretch="Fill" Stroke="{x:Null}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="7.833" Height="9.834" Data="M146,213.33333 C146,213.33333 138.24983,218.87548 138.24983,218.87548 L145.87527,223.75034 z"/>
		</RepeatButton>
	</Grid>
</UserControl>